home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 295_01 / bputh.c < prev    next >
Text File  |  1989-12-28  |  1KB  |  45 lines

  1. /*    Copyright (c) 1989 Citadel    */
  2. /*       All Rights Reserved        */
  3.  
  4. /* #ident    "bputh.c    1.2 - 89/10/31" */
  5.  
  6. /*#include <stddef.h>*/
  7. #include "blkio_.h"
  8.  
  9. /*man---------------------------------------------------------------------------
  10. NAME
  11.      bputh - put the header into a block file
  12.  
  13. SYNOPSIS
  14.      #include <blkio.h>
  15.  
  16.      int bputh(bp, buf)
  17.      BLKFILE *bp;
  18.      const void *buf;
  19.  
  20. DESCRIPTION
  21.      The bputh function writes the the contents of buf into the header
  22.      of block file bp.  buf must point to a storage area at least as
  23.      large as the header size for bp.
  24.  
  25.      bputh will fail if one or more of the following is true:
  26.  
  27.      [EINVAL]       bp is not a valid block file.
  28.      [EINVAL]       buf is the NULL pointer.
  29.      [BENOPEN]      bp is not open for writing.
  30.  
  31. SEE ALSO
  32.      bgeth, bputhf, bputb.
  33.  
  34. DIAGNOSTICS
  35.      Upon successful completion, a value of 0 is returned.  Otherwise,
  36.      a value of -1 is returned, and errno set to indicate the error.
  37.  
  38. ------------------------------------------------------------------------------*/
  39. int bputh(bp, buf)
  40. BLKFILE *bp;
  41. CONST void *buf;
  42. {
  43.     return bputhf(bp, (size_t)0, buf, bp->hdrsize);
  44. }
  45.